package com.zlt.bkparking.entity;

import java.util.ArrayList;
import java.util.List;

public class RedBlackExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public RedBlackExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andRbIdIsNull() {
            addCriterion("rb_id is null");
            return (Criteria) this;
        }

        public Criteria andRbIdIsNotNull() {
            addCriterion("rb_id is not null");
            return (Criteria) this;
        }

        public Criteria andRbIdEqualTo(Long value) {
            addCriterion("rb_id =", value, "rbId");
            return (Criteria) this;
        }

        public Criteria andRbIdNotEqualTo(Long value) {
            addCriterion("rb_id <>", value, "rbId");
            return (Criteria) this;
        }

        public Criteria andRbIdGreaterThan(Long value) {
            addCriterion("rb_id >", value, "rbId");
            return (Criteria) this;
        }

        public Criteria andRbIdGreaterThanOrEqualTo(Long value) {
            addCriterion("rb_id >=", value, "rbId");
            return (Criteria) this;
        }

        public Criteria andRbIdLessThan(Long value) {
            addCriterion("rb_id <", value, "rbId");
            return (Criteria) this;
        }

        public Criteria andRbIdLessThanOrEqualTo(Long value) {
            addCriterion("rb_id <=", value, "rbId");
            return (Criteria) this;
        }

        public Criteria andRbIdIn(List<Long> values) {
            addCriterion("rb_id in", values, "rbId");
            return (Criteria) this;
        }

        public Criteria andRbIdNotIn(List<Long> values) {
            addCriterion("rb_id not in", values, "rbId");
            return (Criteria) this;
        }

        public Criteria andRbIdBetween(Long value1, Long value2) {
            addCriterion("rb_id between", value1, value2, "rbId");
            return (Criteria) this;
        }

        public Criteria andRbIdNotBetween(Long value1, Long value2) {
            addCriterion("rb_id not between", value1, value2, "rbId");
            return (Criteria) this;
        }

        public Criteria andAuIdIsNull() {
            addCriterion("au_id is null");
            return (Criteria) this;
        }

        public Criteria andAuIdIsNotNull() {
            addCriterion("au_id is not null");
            return (Criteria) this;
        }

        public Criteria andAuIdEqualTo(String value) {
            addCriterion("au_id =", value, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdNotEqualTo(String value) {
            addCriterion("au_id <>", value, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdGreaterThan(String value) {
            addCriterion("au_id >", value, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdGreaterThanOrEqualTo(String value) {
            addCriterion("au_id >=", value, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdLessThan(String value) {
            addCriterion("au_id <", value, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdLessThanOrEqualTo(String value) {
            addCriterion("au_id <=", value, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdLike(String value) {
            addCriterion("au_id like", value, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdNotLike(String value) {
            addCriterion("au_id not like", value, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdIn(List<String> values) {
            addCriterion("au_id in", values, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdNotIn(List<String> values) {
            addCriterion("au_id not in", values, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdBetween(String value1, String value2) {
            addCriterion("au_id between", value1, value2, "auId");
            return (Criteria) this;
        }

        public Criteria andAuIdNotBetween(String value1, String value2) {
            addCriterion("au_id not between", value1, value2, "auId");
            return (Criteria) this;
        }

        public Criteria andRbDescIsNull() {
            addCriterion("rb_desc is null");
            return (Criteria) this;
        }

        public Criteria andRbDescIsNotNull() {
            addCriterion("rb_desc is not null");
            return (Criteria) this;
        }

        public Criteria andRbDescEqualTo(String value) {
            addCriterion("rb_desc =", value, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescNotEqualTo(String value) {
            addCriterion("rb_desc <>", value, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescGreaterThan(String value) {
            addCriterion("rb_desc >", value, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescGreaterThanOrEqualTo(String value) {
            addCriterion("rb_desc >=", value, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescLessThan(String value) {
            addCriterion("rb_desc <", value, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescLessThanOrEqualTo(String value) {
            addCriterion("rb_desc <=", value, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescLike(String value) {
            addCriterion("rb_desc like", value, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescNotLike(String value) {
            addCriterion("rb_desc not like", value, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescIn(List<String> values) {
            addCriterion("rb_desc in", values, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescNotIn(List<String> values) {
            addCriterion("rb_desc not in", values, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescBetween(String value1, String value2) {
            addCriterion("rb_desc between", value1, value2, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andRbDescNotBetween(String value1, String value2) {
            addCriterion("rb_desc not between", value1, value2, "rbDesc");
            return (Criteria) this;
        }

        public Criteria andApIdIsNull() {
            addCriterion("ap_id is null");
            return (Criteria) this;
        }

        public Criteria andApIdIsNotNull() {
            addCriterion("ap_id is not null");
            return (Criteria) this;
        }

        public Criteria andApIdEqualTo(Long value) {
            addCriterion("ap_id =", value, "apId");
            return (Criteria) this;
        }

        public Criteria andApIdNotEqualTo(Long value) {
            addCriterion("ap_id <>", value, "apId");
            return (Criteria) this;
        }

        public Criteria andApIdGreaterThan(Long value) {
            addCriterion("ap_id >", value, "apId");
            return (Criteria) this;
        }

        public Criteria andApIdGreaterThanOrEqualTo(Long value) {
            addCriterion("ap_id >=", value, "apId");
            return (Criteria) this;
        }

        public Criteria andApIdLessThan(Long value) {
            addCriterion("ap_id <", value, "apId");
            return (Criteria) this;
        }

        public Criteria andApIdLessThanOrEqualTo(Long value) {
            addCriterion("ap_id <=", value, "apId");
            return (Criteria) this;
        }

        public Criteria andApIdIn(List<Long> values) {
            addCriterion("ap_id in", values, "apId");
            return (Criteria) this;
        }

        public Criteria andApIdNotIn(List<Long> values) {
            addCriterion("ap_id not in", values, "apId");
            return (Criteria) this;
        }

        public Criteria andApIdBetween(Long value1, Long value2) {
            addCriterion("ap_id between", value1, value2, "apId");
            return (Criteria) this;
        }

        public Criteria andApIdNotBetween(Long value1, Long value2) {
            addCriterion("ap_id not between", value1, value2, "apId");
            return (Criteria) this;
        }

        public Criteria andRbStateIsNull() {
            addCriterion("rb_state is null");
            return (Criteria) this;
        }

        public Criteria andRbStateIsNotNull() {
            addCriterion("rb_state is not null");
            return (Criteria) this;
        }

        public Criteria andRbStateEqualTo(Byte value) {
            addCriterion("rb_state =", value, "rbState");
            return (Criteria) this;
        }

        public Criteria andRbStateNotEqualTo(Byte value) {
            addCriterion("rb_state <>", value, "rbState");
            return (Criteria) this;
        }

        public Criteria andRbStateGreaterThan(Byte value) {
            addCriterion("rb_state >", value, "rbState");
            return (Criteria) this;
        }

        public Criteria andRbStateGreaterThanOrEqualTo(Byte value) {
            addCriterion("rb_state >=", value, "rbState");
            return (Criteria) this;
        }

        public Criteria andRbStateLessThan(Byte value) {
            addCriterion("rb_state <", value, "rbState");
            return (Criteria) this;
        }

        public Criteria andRbStateLessThanOrEqualTo(Byte value) {
            addCriterion("rb_state <=", value, "rbState");
            return (Criteria) this;
        }

        public Criteria andRbStateIn(List<Byte> values) {
            addCriterion("rb_state in", values, "rbState");
            return (Criteria) this;
        }

        public Criteria andRbStateNotIn(List<Byte> values) {
            addCriterion("rb_state not in", values, "rbState");
            return (Criteria) this;
        }

        public Criteria andRbStateBetween(Byte value1, Byte value2) {
            addCriterion("rb_state between", value1, value2, "rbState");
            return (Criteria) this;
        }

        public Criteria andRbStateNotBetween(Byte value1, Byte value2) {
            addCriterion("rb_state not between", value1, value2, "rbState");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}